// Copyright (c) Microsoft Corporation.  All rights reserved.

#include "stdafx.h"
#include "D3D10ShaderReflectionVariable.h"

#include "D3D10ShaderReflectionType.h"
using namespace Microsoft::WindowsAPICodePack::DirectX::Direct3D10;

ShaderVariableDescription^ ShaderReflectionVariable::GetDescription()
{
    ShaderVariableDescription^ desc = gcnew ShaderVariableDescription();
    CommonUtils::VerifyResult(GetInterface<ID3D10ShaderReflectionVariable>()->GetDesc(desc->nativeObject.Get()));
    return desc;
}

ShaderReflectionType^ ShaderReflectionVariable::GetType()
{
    ID3D10ShaderReflectionType* returnValue = GetInterface<ID3D10ShaderReflectionVariable>()->GetType();
    return returnValue == NULL ? nullptr : gcnew ShaderReflectionType(returnValue);
}

